package com.gxc;

import com.gxc.chain.UserParamFilterChain;
import com.gxc.facotory.UserParamFilterChainFactory;
import com.gxc.model.User;
import com.gxc.model.UserEo;

/**
 * @author GongXincheng
 * @date 2021/8/16 14:12
 */
public class Demo {


    public static void main(String[] args) {
        UserEo userEo = new UserEo();
        userEo.setUserId("1");
        userEo.setUserName("admin");
        userEo.setAge("26");
        userEo.setBirthday("2021-03-21 21:00:01");
        userEo.setSalary("15500.7");

        User user = new User();

        UserParamFilterChainFactory chainFactory = UserParamFilterChainFactory.getInstance();
        UserParamFilterChain filterChain = chainFactory.getFilterChain();
        filterChain.filter(userEo, user);

        System.out.println(user);
    }

}
